import { Platform } from 'react-native';

export const isAndroid = Platform.OS === 'android';

export const isIos = !isAndroid;

export const APP_STATE = {
  PUBLIC: 'PUBLIC_LOGIN',
  PRIVATE: 'MAIN_APP',
  AUTH: 'CHECKING_LOGIN',
  UNKNOWN: 'UNKNOWN',
};

export const STATUS = {
  SUCCESS: 'SUCCESS',
  NOT_STARTED: 'NOT_STARTED',
  FETCHING: 'FETCHING',
  FAILED: 'FAILED',
};

const clientId = 'loongair_nmr_mobile';
const clientSecret = 'loongair_nmrm';
//const clientBasicAuth = 'bG9vbmdhaXJfbm1yX21vYmlsZTpsb29uZ2Fpcl9ubXJt';
//const clientId = 'loongair_web';
//const clientSecret = 'loongair';
//const clientBasicAuth = 'bG9vbmdhaXJfd2ViOmxvb25nYWly';

// const baseURL = 'https://nmrsmobile.loongair.cn/webapi/'; // test prod 修改编译
// const mobileMsProvider = 'ms-provider-serve-nmrs-mobile';
// const userAuthMsUrl = '';
// const JC_BASEURL = 'http://testmrs.loongair.cn';
// http://mrs.loongair.cn

const baseURL = 'http://10.1.8.55:6050'; // dev
const mobileMsProvider = '';
const userAuthMsUrl = 'http://10.1.128.35:5300/webapi/';
const JC_BASEURL = 'http://10.1.8.51:234';


const appId = 'MRSM';

const ATA_DATA = Array.from({ length: 100 }, (_, i) => ({
  value: `0${i}`.slice(-2),
  label: `0${i}`.slice(-2),
  children: Array.from({ length: 100 }, (_, j) => ({
    value: `0${j}`.slice(-2),
    label: `0${j}`.slice(-2),
  })),
}));

const NO_DATA = { key: 'NoData', text: '暂无数据' };

export {
  baseURL,
  appId,
  clientId,
  clientSecret,
  mobileMsProvider,
  userAuthMsUrl,
  ATA_DATA,
  NO_DATA,
  JC_BASEURL,
};

/*
export const baseURL = {
  dev: '',
  staging: '',
  prod: '',
};

export const appId = {
  dev: '',
  staging: '',
  prod: '',
};
*/
